<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>test-router</title>
</head>
<body>
  <ul>
    <li><a href="#/">turn white</a></li>
    <li><a href="#/blue">turn blue</a></li>
    <li><a href="#/green">turn green</a></li>
  </ul>
  <script src="router.js"></script>
  <script>
    var content = document.querySelector('body');
    function changeBgColor(color) {
      content.style.backgroundColor = color;
    }
    Router.route('/', function() {
      changeBgColor('white');
    });
    Router.route('/blue', function() {
      changeBgColor('blue');
    });
    Router.route('/green', function() {
      changeBgColor('green');
    });
  </script>
</body>
</html>